// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "GameplayTagContainer.h"
#include "Engine/DataAsset.h"
#include "InputConfig.generated.h"

class UInputAction;
/**
 * Tag和对应InputAction结构体
 * 类型或访问内部细节要完整引入,指针前向声明就行
 * 
 */
USTRUCT(BlueprintType)
struct FTaggedInputAction
{
	GENERATED_BODY()

	UPROPERTY(EditDefaultsOnly)
	FGameplayTag InputTag;

	UPROPERTY(EditDefaultsOnly)
	TObjectPtr<UInputAction> InputAction = nullptr;
};



/**
 * 输入配置类,将能力和按键输入通过标签关联起来
 */
UCLASS()
class AURA_API UInputConfig : public UDataAsset
{
	GENERATED_BODY()

public:
	
	/** 带标签的输入操作数组 */
	UPROPERTY(EditDefaultsOnly,BlueprintReadOnly)
	TArray<FTaggedInputAction> AbilityTaggedInputActions;

	UInputAction* FindAbilityTaggedInputActionByTag(const FGameplayTag& InputTag,bool bLogNotFound);
};
